project(CGame++_example)

if(${CGAME_TARGET_PLATFORM} MATCHES 2)
  include_directories(/opt/homebrew/include)
  link_directories(/opt/homebrew/lib)
endif()

add_executable(example_hello ${CMAKE_CURRENT_LIST_DIR}/hello.cpp)
target_link_libraries(example_hello CGame++)


add_executable(example_httpd ${CMAKE_CURRENT_LIST_DIR}/httpd.cpp)
target_link_libraries(example_httpd CGame++)

add_executable(example_socketd ${CMAKE_CURRENT_LIST_DIR}/socketd.cpp)
target_link_libraries(example_socketd CGame++)

add_executable(example_socket ${CMAKE_CURRENT_LIST_DIR}/socket.cpp)
target_link_libraries(example_socket CGame++)


add_executable(example_byte ${CMAKE_CURRENT_LIST_DIR}/byte.cpp)
target_link_libraries(example_byte CGame++)


add_executable(example_yml ${CMAKE_CURRENT_LIST_DIR}/yml.cpp)
target_link_libraries(example_yml CGame++)

add_executable(example_event ${CMAKE_CURRENT_LIST_DIR}/event.cpp)
target_link_libraries(example_event CGame++)

add_executable(example_logger ${CMAKE_CURRENT_LIST_DIR}/logger.cpp)
target_compile_definitions(example_logger PRIVATE CGAME_TARGET_LOGGER=0)
target_link_libraries(example_logger CGame++)

add_executable(example_timer ${CMAKE_CURRENT_LIST_DIR}/timer.cpp)
target_link_libraries(example_timer CGame++)

add_executable(example_cron ${CMAKE_CURRENT_LIST_DIR}/cron.cpp)
target_link_libraries(example_cron CGame++)

add_executable(example_curl ${CMAKE_CURRENT_LIST_DIR}/curl.cpp)
target_link_libraries(example_curl CGame++)

add_executable(example_time ${CMAKE_CURRENT_LIST_DIR}/time.cpp)
target_link_libraries(example_time CGame++)
